﻿using System.Numerics;

namespace ConsoleApp1
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int userInput = Convert.ToInt32(Console.ReadLine());
            int[] result = new int[userInput];
            bool[] sign = new bool[userInput];
            for (int i = 2; i < userInput; i++)
            {
                if (!sign[i])
                {
                    result[i] = i;
                    for (int j = i + i; j < userInput; j += i)
                    {
                        //排除不是质数的数
                        sign[j] = true;
                    }
                }
            }

            for (int i = 2; i < userInput; i++)
            {
                if (result[i] != 0)
                {
                    Console.WriteLine(result[i]);
                }
            }


        }
    }
}
